Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch packages to use the @nx scope #16069

Merged
merged 31 commits into from
Apr 14, 2023
Merged

Conversation

FrozenPandaz
Copy link
Collaborator

@FrozenPandaz FrozenPandaz commented Apr 3, 2023

Switch packages to use the @nx scope

Nx's first party plugins and other packages will be published under @nx starting in v16. @nrwl/* packages will no longer be published in Nx 17.

This PR does the following:

  • The @nrwl/ packages are now published under the @nx scope.
    • @nrwl/js => @nx/js
    • @nrwl/react => @nx/react
    • @nrwl/angular => @nx/angular
    • etc.
    • The one exception is @nrwl/tao which does not need to be changed to @nx/tao but needs to collect consistent statistics.
  • @nrwl/* packages are still published but they are shells of their @nx/ counterparts
    • Any public apis re-export from their @nx counterparts
    • Any generators will still be available (@nrwl/react:library)
    • Any executors will still be available (@nrwl/webpack:webpack)
    • These packages have a new README.md which says that the package has been deprecated and to use the @nx/* counterpart
    • Everything that can be done today with the @nrwl/* packages should be able to be done the same way in Nx 16
    • In Nx 17, @nrwl/* packages will cease to be published
  • The @nx packages have been added to the package group
  • The @nx packages have replaced the @nrwl packages in the First party plugins for nx list
  • This PR changes any imports have been modified to @nx/* imports
    • For now in this PR, other usages of other packages remain @nrwl/
      • For example, create-nx-workspace will still install @nrwl/
      • I used this to ensure that the @nrwl/* packages are working properly.
      • Before Nx 16, is released, these usages will change to @nx
      • This will be the next phase of this effort before Nx 16 is released.
        • Those PRs will be more granular 😅
  • Docs have not changed yet in this PR
    • When Nx 16 has been released, we will update the docs
    • There is a temporary change to the docs generation to generate the docs for @nx/* packages as @nrwl/* docs

Misc changes that were necessary to make this possible:

  • @nx/angular is now built with @nx/angular:package instead of @angular-devkit/build-angular:ng-packagr
  • You can reference other packages for the implementation or schema of an executor
    • @nrwl/jest:jest references @nx/jest:jest for its implementation
    • Note: We did not want to allow extending a collection of executors like you can generators because it makes less sense for executors.

Current Behavior

Packages are published under the @nrwl scope.

Expected Behavior

Packages are published under the @nx scope.

We will still publish @nrwl/ packages for v17 but they will be wrappers of their @nx counterparts.

We plan to stop publishing @nrwl/ packages starting in v18.

There is a migration to help people automatically move to the @nx packages.

Related Issue(s)

Fixes #

@vercel
Copy link

vercel bot commented Apr 3, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Apr 14, 2023 11:10pm

@vercel
Copy link

vercel bot commented Apr 3, 2023

Deployment failed with the following error:

The provided GitHub repository does not contain the requested branch or commit reference. Please ensure the repository is not empty.

@FrozenPandaz FrozenPandaz force-pushed the nx-scope branch 3 times, most recently from 10004e0 to 2fe0f79 Compare April 4, 2023 14:49
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants